<!-- 继承模板 -->
@extends('Admin/Layout/base')

<!-- 标题设置 -->
@section('title', '编辑分类')

@section('style')
    <!-- 加载ueditor -->
    @include('vendor.ueditor.assets')
@endsection

@section('content')



<div class="row-content am-cf">

    <div class="row">

        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <div class="widget am-cf">
                <div class="widget-head am-cf">
                    <div class="widget-title am-fl">编辑标签</div>
                    <div class="widget-function am-fr">
                        {{-- <a href="javascript:;" class="am-icon-cog"></a> --}}
                    </div>
                </div>
                
                <div class="widget-body am-fr">
                       
                    <form class="am-form tpl-form-line-form" action="{{url('admin/tag/') . '/' . $tagInfo['id']}}" method="post" enctype="multipart/form-data">
                        
                        {{ csrf_field() }}
                        {{ method_field('PUT')}}

                        <input type="hidden" name="id" value="{{$tagInfo['id']}}">

                        <div class="am-form-group">
                            <label for="user-name" class="am-u-sm-3 am-form-label">标签名 <span class="tpl-form-line-small-title">Tags</span></label>
                            <div class="am-u-sm-9">
                                <input type="text" class="tpl-form-input" id="user-name" name="name" placeholder="请输入标签名" value="{{$tagInfo['name']}}">
                                
                                @if ($errors->has('name'))
                                    <small style="color: red">{{ $errors->first('name') }}</small>
                                @else
                                    <small>标签名，限1-20个字符。</small>
                                @endif

                            </div>
                        </div>

                        {{-- 按钮 --}}
                        <div class="am-form-group">
                            <div class="am-u-sm-9 am-u-sm-push-3">
                                <button type="submit" class="am-btn am-btn-primary tpl-btn-bg-color-success ">提交</button>
                                <button type="button" class="am-btn am-btn-primary tpl-btn-bg-color-success " onclick="history.back()">返回</button>
                            </div>
                        </div>
                        
                    </form>

                </div>
            </div>
        </div>
    </div>

</div>

@endsection


@section('footer-js')

  
<script type="text/javascript">
    // 上传图片后显示图片
    function c () {
        var r= new FileReader();

        f=document.getElementById('doc-form-file').files[0];

        r.readAsDataURL(f);

        r.onload=function  (e) {
            document.getElementById('show').src=this.result;
        };
    }


</script>

@endsection